/*
*   ConditionVariable.c
*   Author: Dustin Striplin
*   The condition variable contains a queue and is managed by the kernal
*/
#include <stdlib.h>
#include "ConditionVariable.h"

//allocate room on the heap for this object
CVPtr conditionVariableConstructor(void) {
    CVPtr this = (CVPtr) malloc(sizeof(CVStr));
    this->waitingQueue = queueConstructor();
    this->destruct = conditionVariableDestructor;
    return this;
}

//deallocates room for this object
void conditionVariableDestructor(CVPtr this) {
    this->waitingQueue->destruct(this->waitingQueue);
    free(this);
}
